package com.midnight.rstar.domain;

import java.util.HashMap;

/**
 * @Author hanbo
 * @Since 2024/1/24
 */
public class NetResult2 extends NetResult<HashMap<String, Object>> {

    protected NetResult2(int code, String msg) {
        super(new HashMap<>(), code, msg);
    }

    public static NetResult2 succ() {
        return new NetResult2(SUCC, null);
    }

    public static NetResult2 succ(String msg) {
        return new NetResult2(SUCC, msg);
    }


    public NetResult2 append(String key, Object value) {
        if (key != null && value != null) {
            data.put(key, value);
        }
        return this;
    }

}
